﻿@model Dexter.Web.Mvc.ViewModel.ViewsData.PublicBaseViewData
<li>
	<ul class="nav">
		@foreach (var category in Model.Categories)
		{
			<li class="cat-item">
				<a title="@string.Format("{0} ({1} items)",category.Name,category.ContentNumber)" href="@Html.Raw(U.Category.Detail(category))">
					<span>@category.Name</span>
				</a>
				<a class="rss tip" title="@category.Name" href="@Html.Raw(U.Category.Feed(category))" rel="nofollow"></a>
				@if(category.Categories.Any())
				{
					<ul class="children">
						@foreach (var subCategory in category.Categories)
						{
							<li class="cat-item cat-item-3">
								<a title="@string.Format("{0} ({1} items)",subCategory.Name,subCategory.ContentNumber)" href="@Html.Raw(U.Category.Detail(subCategory))" style="margin-left: 0px;">
									<span>@subCategory.Name</span>
								</a>
								<a class="rss tip" title="@subCategory.Name" href="@Html.Raw(U.Category.Feed(category))"></a>
							</li>
						}
					</ul>
				}
			</li>
		}
	</ul>
</li>


<li>
	<div id="recent-posts" class="widget widget_recent_entries">
		<h2>Recent Posts</h2>
		<ul>
			@foreach (var post in Model.RecentPost)
			{
				<li>
					<a title="@post.Abstract" href="@Html.Raw(U.Post.Detail(post))">@post.Title</a>
				</li>
			}
		</ul>
	</div>
</li>

<li>
	<div id="recent-comments" class="widget widget_recent_comments">
		<h2>Recent Comments</h2>
		<ul id="recentcomments">
			@foreach (var comment in Model.RecentComment)
			{
				<li class="recentcomments">
					@comment.Name
					<a href="@Html.Raw(U.Post.FeedBack(comment.Item))" title="@comment.Item.Title">@comment.Item.Title</a>
				</li>
			}
		</ul>
	</div>
</li>

<li>
	<div class="widget">
		<h2>Tags</h2>
		@Html.TagCloud(Model.TopTags)
	</div>
</li>

<li>
	<div class="widget widget_links">
		<h2>Blogroll</h2>
		<ul class="xoxo blogroll">
			@foreach (var blogRoll in Model.BlogsRoll.Result)
			{
				<li>
					<a title="@blogRoll.Name" href="@blogRoll.Link" rel="@Html.Raw(blogRoll.GenerateRel())" target="_blank">
						@blogRoll.Name
					</a>
				</li>
			}
		</ul>
	</div>
</li>

<li>
	<div class="widget widget_recent_comments">
		<h2>Archive</h2>
		<ul>
			@foreach (var month in Model.Months)
			{
				<li class="recentcomments">
					<a title="@month.MonthName" href="@Html.Raw(U.Post.ArchivePosts(month.MonthID, month.Year))">@string.Format("{0} ({1})- ({2})",month.MonthName,month.Year,month.Count)</a>
				</li>
			}
		</ul>
	</div>
</li>